package com.yang;

import com.google.common.eventbus.EventBus;
import lombok.Data;

/**
 * @author yang
 * @date 2019/4/22 9:48
 */
@Data
public class Gper {
    private String username;
    private String msg;

    private static EventBus eventBus = new EventBus();

    public static EventBus getEventBus() {
        return eventBus;
    }

    public static void register(Object obj) {
        eventBus.register(obj);
    }

    public static void unregister(Object obj) {
        eventBus.unregister(obj);
    }

    public static void post(Object obj) {
        eventBus.post(obj);
    }
}
